HttpClient Table Entries |
||
---|---|---|
Name |
Type |
Description |
Url |
string |
The URL to either upload to or download from |
Headers |
table |
a table of header ( string --> string ) |
User |
string |
Username for authenticated sites |
Password |
string |
Password for authenticated sites |
Data |
string |
Used by .Upload |
Method |
string |
Either "POST" or "PUT", used by .Upload |
EventHandler |
function |
Function to call with status. Signature is function( table, http_code, data, error ). 'code' is the http return code (200 is good). |
function done(tbl, code, d, e) print( code, d, e ) end
HttpClient.Download { Url = "http://www.google.com", EventHandler = done } |
function done(tbl, code, d, e) print( code, d, e ) end
HttpClient.Upload { Url = "http://posttestserver.com/post.php", Method = "POST", User = "Admin", Password = "test", Data = "this is a test", Headers = { ["Content-Type"] = "text/html", Larry = "another larry" }, EventHandler = done } |
© 2009 - 2016 QSC, LLC. All rights reserved. QSC and the QSC logo are trademarks of QSC, LLC in the U.S. Patent and Trademark office and other countries. All other trademarks are the property of their respective owners.
http://patents.qsc.com.